package org.aplombh.java.interview.newcoder;

import java.util.Scanner;

public class ZZ_重复字符 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int[] a = new int[101];
        int[] b = new int[101];

        for (int i = 0; i < 100; i++) {
            a[i] = in.nextInt();
        }

        for (int i = 0; i < 100; i++) {
            if (b[a[i]] != 0) {
                System.out.println(b[a[i]] + " " + i);
                return;
            }
            b[a[i]]++;
        }
    }
}


